Skip to content

[tycho-5.0.x] Fix NPE in createP2Index for in-place composite-repository edits - #6521

Open
eclipse-tycho-bot wants to merge 1 commit into
tycho-5.0.xfrom
backport/tycho-5.0.x/pr-6286
Open

eclipse-tycho-bot wants to merge 1 commit into
tycho-5.0.xfrom
backport/tycho-5.0.x/pr-6286

Conversation

@eclipse-tycho-bot

Copy link
Copy Markdown

Backport

This will backport the following commits from main to tycho-5.0.x:

Questions ?

Please refer to the Backport tool documentation

@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Test Results

1 089 files  +3  1 089 suites  +3   8h 47m 27s ⏱️ + 3h 49m 41s
1 422 tests +1  1 397 ✅  - 2  21 💤 ±0  0 ❌ ±0  4 🔥 +3 
4 266 runs  +3  4 191 ✅  - 4  67 💤 ±0  0 ❌ ±0  8 🔥 +7 

For more details on these errors, see this check.

Results for commit 030eb69. ± Comparison against base commit b9560d0.

♻️ This comment has been updated with latest results.

modifyCompositeRepository resolves the effective output location for
an in-place edit (a null outputLocation on the descriptor) inside
modifyOutputCompositeRepository, but only as a local variable that is
never written back to the descriptor. It then calls
createP2Index(repository.outputLocation(), ...) directly afterward,
passing the still-null field, which createP2Index dereferences with
directory.resolve("p2.index") -- throwing NullPointerException after
the composite metadata has already been written.

Extract the existing null-fallback into a shared
resolveOutputLocation() helper and use it at both call sites, so
modifyCompositeRepository passes the same resolved path to
createP2Index that modifyOutputCompositeRepository already computes
for itself.

Fixes #6251

(cherry picked from commit 937fa07)
@HannesWell
HannesWell force-pushed the backport/tycho-5.0.x/pr-6286 branch from 03f0e6e to 030eb69 Compare November 22, 2026 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants